﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ESRI
{
    public class SHPFileRecordHeader
    {
        public int RecordNumber { get; set; }
        public int ContentLength { get; set; }

        public SHPFileRecordHeader() { }
        public SHPFileRecordHeader(int recordNumber, int contentLength)
        {
            RecordNumber = recordNumber;
            ContentLength = contentLength;
        }
        public SHPFileRecordHeader(byte[] recordNumber, byte[] contentLength)
        {
            Array.Reverse(recordNumber);
            Array.Reverse(contentLength);
            RecordNumber = BitConverter.ToInt32(recordNumber, 0);
            ContentLength = BitConverter.ToInt32(contentLength, 0);
        }
    }
}
